Skip to Main Content
Coursera

Press the up or down arrow key to navigate

    Goals
  • Take a free course
    Subjects
  • Browse all subjects

Earn a Degree

Breakthrough pricing on 100% online degrees designed to fit into your life.

Data Science

  • University of Colorado Boulder Logo
    University of Colorado Boulder
    Master of Science in Data Science
  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master in Computer Science
  • View all Data Science degrees

Business

  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master of Science in Management
  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master of Business Administration (iMBA)
  • View all Business degrees

Computer Science

  • Penn Engineering Logo
    Penn Engineering
    Master of Computer and Information Technology
  • Arizona State University Logo
    Arizona State University
    Master of Computer Science
  • View all Computer Science degrees

More Degrees

  • Public Health
  • Bachelor's Degrees
  • Engineering
  • Master's Degrees
  • Social Sciences

Earn credit toward a master's

  • undefined Logo
    Big Data MasterTrack® Certificate
    Degree credit•Expert feedback
  • undefined Logo
    Innovation Management & Entrepreneurship MasterTrack® Certificate
    Degree credit•Expert feedback
  • View all MasterTrack Certificates

Earn a Certificate

In 3-9 months, gain the skills to break into a new career or take your career to the next level.

Data Science

  • undefined Logo
    Google Data Analytics
    No prerequisites•Self-paced
  • undefined Logo
    IBM Data Science
    No prerequisites•Self-paced
  • undefined Logo
    Machine Learning for Analytics MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Data Science Certificates

Business

  • undefined Logo
    Facebook Social Media Marketing
    No prerequisites•Self-paced
  • undefined Logo
    Google Project Management:
    No prerequisites•Self-paced
  • undefined Logo
    IBM Machine Learning
    Self-paced
  • View all Business Certificates

Computer Science

  • undefined Logo
    AI and Machine Learning MasterTrack® Certificate
    Expert feedback•Credit eligible
  • undefined Logo
    DeepLearning.AI TensorFlow Developer
    Certification preparation•Self-paced
  • undefined Logo
    Software Engineering MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Computer Science Certificates

More Certificate Programs

  • Computer Science
  • Physical Science and Engineering
  • Social Sciences
  • Language Learning

Launch or advance your career

Data Science

  • Data Scientist
  • Data Analyst
  • BI Analyst
  • BI Developer
  • Data Engineer

Business

  • Agile Project Manager (IT)
  • Digital Marketing Specialist
  • Digital Marketing Manager
  • Project Coordinator
  • Project Manager
  • Social Media Coordinator

Computer Science

  • Computer User Support Specialist
  • Network Administrator
  • Network Engineer
  • Product Designer

Arts and Humanities

  • Graphic Designer
  • UI/UX Designer
  • View all Professional Certificates

Data Science

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Python
  • SQL
  • Microsoft Excel
  • Excel
  • Machine Learning
  • Data Science
  • Power BI
  • Artificial Intelligence
  • Free Courses Data Science
  • Data Analytics
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • University of Colorado Boulder Logo
    University of Colorado Boulder
    Master of Science in Data Science
  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master in Computer Science
  • Arizona State University Logo
    Arizona State University
    Master of Computer Science
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Google Data Analytics
    No prerequisites•Self-paced
  • undefined Logo
    IBM Data Science
    No prerequisites•Self-paced
  • undefined Logo
    Machine Learning for Analytics MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Business

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Project Management
  • Microsoft Excel
  • Excel
  • Digital Marketing
  • Power BI
  • Blockchain
  • Free Courses Data Science
  • Communication Skills
  • Stock Market
  • Marketing
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master of Science in Management
  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master of Business Administration (iMBA)
  • O.P. Jindal Global University Logo
    O.P. Jindal Global University
    MBA in Business Analytics
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Facebook Social Media Marketing
    No prerequisites•Self-paced
  • undefined Logo
    Google Project Management:
    No prerequisites•Self-paced
  • undefined Logo
    IBM Machine Learning
    Self-paced
  • View all Certificates

Computer Science

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Python
  • Cybersecurity
  • Java
  • Machine Learning
  • Web Development
  • C++
  • Artificial Intelligence
  • Blockchain
  • AWS
  • Javascript
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • Penn Engineering Logo
    Penn Engineering
    Master of Computer and Information Technology
  • Arizona State University Logo
    Arizona State University
    Master of Computer Science
  • HSE University Logo
    HSE University
    Master of Computer Vision
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    AI and Machine Learning MasterTrack® Certificate
    Expert feedback•Credit eligible
  • undefined Logo
    DeepLearning.AI TensorFlow Developer
    Certification preparation•Self-paced
  • undefined Logo
    Software Engineering MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Information Technology

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Google
  • Cybersecurity
  • AWS
  • Linux
  • DevOps
  • Ethical Hacking
  • IoT
  • Azure
  • Google Cloud
  • Kubernetes
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • Penn Engineering Logo
    Penn Engineering
    Master of Computer and Information Technology
  • Arizona State University Logo
    Arizona State University
    Master of Computer Science
  • University of Illinois at Urbana-Champaign Logo
    University of Illinois at Urbana-Champaign
    Master of Computer Science
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Google IT Support
    No prerequisites•Self-paced
  • undefined Logo
    Preparing for Google Cloud Certification: Cloud Architect
    Certification preparation•Self-paced
  • undefined Logo
    Cybersecurity MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Language Learning

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • English Speaking
  • English
  • Korean
  • French
  • Japanese
  • Chinese
  • English Grammar
  • English Writing
  • Korean Language
  • Linguistics
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • National Research Tomsk State University Logo
    National Research Tomsk State University
    Global MA in English Language Teaching Leadership
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Arizona State University TESOL
    Certification preparation•Self-paced
  • undefined Logo
    English Proficiency for Graduate Studies Certificate
    Expert feedback•Live sessions
  • View all Certificates

Health

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Psychology
  • Medicine
  • Biology
  • Medical
  • Neuroscience
  • Bioinformatics
  • Free Courses Psychology
  • Emotional Intelligence
  • Mental Health
  • Anatomy
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • University of Michigan Logo
    University of Michigan
    Master of Science in Population and Health Sciences
  • University of Michigan Logo
    University of Michigan
    Master of Public Health
  • Imperial College London Logo
    Imperial College London
    Global Master of Public Health
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Health Informatics MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Personal Development

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Communication Skills
  • Soft Skills
  • Critical Thinking
  • Free Courses Psychology
  • Emotional Intelligence
  • Teaching English
  • Public Speaking
  • Teaching
  • Mindfulness
  • Positive Psychology
  • View all skills

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    CertNexus Certified Ethical Emerging Technologist
    Certification preparation•Self-paced
  • undefined Logo
    ICPM Certified Supervisor
    Certification preparation•Self-paced
  • View all Certificates

Physical Science and Engineering

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Physics
  • Calculus
  • Civil Engineering
  • Electronics
  • Robotics
  • Autocad
  • GIS
  • Astronomy
  • Embedded Systems
  • Chemistry
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • University of Colorado Boulder Logo
    University of Colorado Boulder
    Master of Science in Electrical Engineering
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    IBM AI Engineering
    Self-paced
  • undefined Logo
    Preparing for Google Cloud Certification: Cloud Engineer
    Certification preparation•Self-paced
  • undefined Logo
    Industrial Internet of Things MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Social Sciences

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Law
  • Teaching English
  • Economics
  • International Relations
  • Journalism
  • Sociology
  • Teaching
  • History
  • Education
  • Instructional Design
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • O.P. Jindal Global University Logo
    O.P. Jindal Global University
    M.A. in Public Policy
  • O.P. Jindal Global University Logo
    O.P. Jindal Global University
    M.A. in International Relations, Security, and Strategy
  • University of Michigan Logo
    University of Michigan
    Master of Public Health
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Social Work MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Arts and Humanities

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Art
  • Photoshop
  • Music
  • Photography
  • Creative Writing
  • Drawing
  • Design
  • Art History
  • Interior Design
  • Film
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • University of North Texas Logo
    University of North Texas
    Bachelor of Applied Arts and Sciences
  • View all degrees

Certificate programs

In 3-9 months, gain the skills to break into a new career or take your career to the next level.
  • undefined Logo
    Google UX Design
    No prerequisites•Self-paced
  • undefined Logo
    UX Design MasterTrack® Certificate
    Expert feedback•Credit eligible
  • View all Certificates

Math and Logic

Get started

  • Free courses
  • Most popular
  • Guided Projects under 2 hours

Popular skills

  • Math
  • Optimization
  • Discrete Mathematics
  • Pre Calculus
  • Multivariable Calculus
  • View all skills

Degrees

Breakthrough pricing on 100% online degrees designed to fit into your life.
  • University of London Logo
    University of London
    Bachelor of Science in Computer Science
  • View all degrees
  • Browse
  • Top Courses
  • Profile
  • My Purchases
  • Get 50% Off
  • Settings
  • Updates
  • Accomplishments
  • Help Center
    Coursera
    1. Sequence Models
    2. Week 2
    3. Natural Language Processing & Word Embeddings
    PreviousNext
      • Completed
        Quiz: Natural Language Processing & Word Embeddings
        10 questions
      • Programming Assignment
        Programming Assignment: Operations on Word Vectors - Debiasing
        . Duration: 3 hours3h
      • Programming Assignment
        Programming Assignment: Emojify
        . Duration: 3 hours3h
    QuizQuiz • 30 min30 minutes

    Natural Language Processing & Word Embeddings

    Activity Completed
    Submit your assignment
    Due DateJul 12, 2:59 AM EDTJuly 12, 2:59 AM EDT
    Attempts3 every 8 hours
    Activity Completed
    Receive grade
    To Pass80% or higher
    Grade
    100%
    We keep your highest score

    Confirm Navigation

    Are you sure you want to leave this page?
      
    Natural Language Processing & Word Embeddings
    Graded Quiz • 30 min

    Due Jul 12, 2:59 AM EDT

    Check
    Congratulations! You passed!
    To Pass 80% or higher
    Grade
    100%

    Natural Language Processing & Word Embeddings

    Latest Submission Grade
    100%
    1.
    Question 1

    Suppose you learn a word embedding for a vocabulary of 10000 words. Then the embedding vectors should be 10000 dimensional, so as to capture the full range of variation and meaning in those words.

    1 / 1 point
    Check
    Correct

    The dimension of word vectors is usually smaller than the size of the vocabulary. Most common sizes for word vectors range between 50 and 400.

    2.
    Question 2

    What is t-SNE?

    1 / 1 point
    Check
    Correct

    Yes

    3.
    Question 3

    Suppose you download a pre-trained word embedding which has been trained on a huge corpus of text. You then use this word embedding to train an RNN for a language task of recognizing if someone is happy from a short snippet of text, using a small training set.

    x (input text)y (happy?)
    I'm feeling wonderful today!1
    I'm bummed my cat is ill.0
    Really enjoying this!1

    Then even if the word “ecstatic” does not appear in your small training set, your RNN might reasonably be expected to recognize “I’m ecstatic” as deserving a label y=1y = 1y=1.

    1 / 1 point
    Check
    Correct

    Yes, word vectors empower your model with an incredible ability to generalize. The vector for “ecstatic” would contain a positive/happy connotation which will probably make your model classify the sentence as a "1".

    4.
    Question 4

    Which of these equations do you think should hold for a good word embedding? (Check all that apply)

    1 / 1 point
    Check
    Correct

    Yes!

    Check
    Correct

    Yes!

    5.
    Question 5

    Let EEE be an embedding matrix, and let o1234o_{1234}o1234​ be a one-hot vector corresponding to word 1234. Then to get the embedding of word 1234, why don’t we call E∗o1234E * o_{1234}E∗o1234​ in Python?

    1 / 1 point
    Check
    Correct

    Yes, the element-wise multiplication will be extremely inefficient.

    6.
    Question 6

    When learning word embeddings, we create an artificial task of estimating P(target∣context)P(target \mid context)P(target∣context). It is okay if we do poorly on this artificial prediction task; the more important by-product of this task is that we learn a useful set of word embeddings.

    1 / 1 point
    Check
    Correct
    7.
    Question 7

    In the word2vec algorithm, you estimate P(t∣c)P(t \mid c)P(t∣c), where ttt is the target word and ccc is a context word. How are ttt and ccc chosen from the training set? Pick the best answer.

    1 / 1 point
    Check
    Correct
    8.
    Question 8

    Suppose you have a 10000 word vocabulary, and are learning 500-dimensional word embeddings. The word2vec model uses the following softmax function:

    P(t∣c)=eθtTec∑t’=110000eθt’TecP(t \mid c) = \frac{e^{\theta_t^T e_c}}{\sum_{t’=1}^{10000} e^{\theta_{t’}^Te_c}}P(t∣c)=∑t’=110000​eθt’T​ec​eθtT​ec​​

    Which of these statements are correct? Check all that apply.

    1 / 1 point
    Check
    Correct
    Check
    Correct
    9.
    Question 9

    Suppose you have a 10000 word vocabulary, and are learning 500-dimensional word embeddings.The GloVe model minimizes this objective:

    min⁡∑i=110,000∑j=110,000f(Xij)(θiTej+bi+bj’−logXij)2\min \sum_{i=1}^{10,000} \sum_{j=1}^{10,000} f(X_{ij}) (\theta_i^T e_j + b_i + b_j’ - log X_{ij})^2min∑i=110,000​∑j=110,000​f(Xij​)(θiT​ej​+bi​+bj​’−logXij​)2

    Which of these statements are correct? Check all that apply.

    1 / 1 point
    Check
    Correct
    Check
    Correct

    The weighting function helps prevent learning only from extremely common word pairs. It is not necessary that it satisfies this function.

    Check
    Correct
    10.
    Question 10

    You have trained word embeddings using a text dataset of m1m_1m1​ words. You are considering using these word embeddings for a language task, for which you have a separate labeled dataset of m2m_2m2​ words. Keeping in mind that using word embeddings is a form of transfer learning, under which of these circumstances would you expect the word embeddings to be helpful?

    1 / 1 point
    Check
    Correct